const names = ['zzl','wxl','ll'];
function data(){
    console.log(arguments);
}

data(names);
data(...names);

const a = ['aaa'];
const b = ['bbb'];
const c=[...a,...b];
console.log(c);

let s = Symbol();
let s2 = Symbol('ani');
let s3 = Symbol('shi');
let s4 = Symbol.for('ani');
let s5 = Symbol.for('ani');

let datas = {
    up:Symbol(),
    down:Symbol()
}
let game={};
game[data.up]=function(){
    console.log('我会飞');
    
}
game[data.down] = function(){
    console.log('我会爬');
    
}
console.log('game',game);
console.log('datas',datas);

let play = {
    name:'run',
    [Symbol('say')]:function(){
        console.log('我会说话');
        
    },
    [Symbol('sleep')]:function(){
        console.log('我会睡觉');
        
    }
}

console.log("play",play);

let arr = ['aaa','bbb'];
console.log('arr',arr);

for(let i in arr){
    console.log(i);
    
    
}

for(let i of arr){
    console.log(i);
    
}

 
console.log('--------');
let xiyou = ['孙悟空','猪八戒','沙僧'];
let iterator = xiyou[Symbol.iterator]();
console.log(iterator.next());
console.log(iterator.next());
console.log(iterator.next());


console.log('---------手写迭代器---------');


